﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using Logs;

namespace Communication.Udp {
    /// <summary>
    /// Udp数据处理
    /// </summary>
    public class AsyncUdpProMsg {
        /// <summary>
        /// 处理接收数据
        /// </summary>
        /// <param name="ipEndPoint"></param>
        /// <param name="msg"></param>
        public void ProReceiveMsg(IPEndPoint ipEndPoint,byte[] msg) {
            Log.Debug(string.Format("来自于{0}，接收到{1}个数据：{2}",ipEndPoint.ToString(),msg.Length,Encoding.ASCII.GetString(msg)));
        }

        /// <summary>
        /// 待发送数据
        /// </summary>
        /// <returns></returns>
        public byte[] ToSendMsg() {
            byte[] sendbuff = new byte[] { 0x01 };

            return sendbuff;
        }
    }
}
